<!-- /.box-header -->
<div class="dataTables_filter" id="searchDiv_monitor" style="display: none">
    <!--查询条件-->
    <input type="hidden" name="processInstanceId" value="${instanceId}">
</div>
<div class="box-body">
    <table id="monitor_table" class="table table-bordered table-striped table-hover">
    </table>
</div>


<script>
    var instanceId = "${instanceId?default(0)}";
    var monitorTable = new CommonTable("monitor_table", "monitor_detail_list", "searchDiv_monitor");

    //任务状态
    function fnRenderActivityState(value, type, rowObj) {
        if (value == 0) {
            return '<span class="label label-success">已执行</span>'
        } else if (value == 1) {
            return '<span class="label label-danger">待执行</span>';
        }else{
            return '<span class="label label-warning">未执行</span>';
        }
        return value;
    }

    //审批结果
    function fnRenderApproved(value,type,rowObj){
        if(value=='true'){
            return '<span class="label label-success">同意</span>';
        }else if(value=='false'){
            return '<span class="label label-danger">拒绝</span>';
        }else if(value){
            return '<span class="label label-primary">'+value+'</span>';
        }else if(rowObj.activityState==0){
            return '<span class="label label-primary">提交</span>';
        }else{
            return value;
        }
    }
</script>
